GBML manual / Audio

music_tempo

Sets the tempo (song speed - 1 = normal, 2 = double speed) of the music currently playing, in the range 0.5..2, independent of pitch.

Syntax

music_tempo(tempo)

Arguments

NameType
temporeal

Returns

Nothing.

Description

Sets the tempo (song speed - how fast the tracker's own rows advance - 1 = normal, 2 = double speed) of the music currently playing, in the range 0.5..2, independent of pitch. A no-op while nothing is playing, and resets to 1 the instant music_play/music_fade_to next starts a different song - see music_pitch for the full independence-from-pitch account.

Example

music_play(song_doc_theme, true, 1);
music_tempo(1.3);

Starts the theme 30% faster than authored - its pitch is untouched, only how quickly it plays. A rising music_tempo over the last few seconds of a timed level is a classic "hurry up" effect this makes possible without re-recording anything.

On the GBA

A no-op while nothing is playing. Resets to 1 the instant music_play/music_fade_to next starts a DIFFERENT song, same as music_pitch - see that entry for the full independence-from-pitch note.

See also: music_pitchmusic_position